import upload from '@/utils/upload'
import request from '@/utils/request'


// 查询派单池信息分页
export function getOrderList(params){
	return request({
	  url: '/oper/dispatch-pool/list',
	  method: 'GET',
	  params: params
	})
}

//抢单
export function robOrder(id){
	return request({
	  url: '/oper/dispatch-pool/take',
	  method: 'POST',
	  params: {id:id}
	})	
}

//接单
export function take(id){
	return request({
	  url: '/oper/fault/take',
	  method: 'POST',
	  params: {id:id}
	})	
}

//上门
export function visit(params){
	return request({
	  url: '/oper/fault/visit',
	  method: 'POST',
	  data: params
	})	
}

export function arrived(params){
	return request({
	  url: '/oper/fault/arrived',
	  method: 'POST',
	  data: params
	})	
}

export function inspection(params){
	return request({
	  url: '/oper/fault/inspection',
	  method: 'POST',
	  data: params
	})	
}

export function inspectionEnd(params){
	return request({
	  url: '/oper/fault/inspectionEnd',
	  method: 'POST',
	  data: params
	})	
}

export function repair(params){
	return request({
	  url: '/oper/fault/repair',
	  method: 'POST',
	  data: params
	})	
}

export function finished(params){
	return request({
	  url: '/oper/fault/finished',
	  method: 'POST',
	  data: params
	})	
}

export function resend(params){
	return request({
	  url: '/oper/fault/resend',
	  method: 'POST',
	  data: params
	})	
}

// 查询运维信息分页
export function getFaultPage(params){
	return request({
	  url: '/oper/fault/page-oper',
	  method: 'GET',
	  params: params
	})
}

export function getFaultAndStation(id){
	return request({
	  url: '/oper/fault/get-fault-station',
	  method: 'GET',
	  params: {id:id}
	})
	
}
